package com.cyy.proxy_pattern;

/**
 * 大奔的酒摊
 */
public class DaBen implements Jiu{
    //声明酒的名字和干娘酒馆的属性
    private String name;
    private GanNiang ganNiang;

    public DaBen(){
    }

    public DaBen(String name) {
        this.name = name;
    }

    @Override
    public void show() {
        if(ganNiang == null){
            ganNiang = new GanNiang(name);
        }
        ganNiang.show();
    }
}
